<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="aui-block report-detection-result">
    <i [lv-icon]="detectionIcon"></i>
    <div class="no-data-label">
        <h1 class="aui-gutter-column-sm">{{detectionResultLabel}}</h1>
    </div>
    <div class="no-data-label" *ngIf="!entity">
        <p class="aui-text-help-sm aui-gutter-column-lg" *ngIf="!isEn">
            {{copyDataLabel}}{{'common_copy_data_label' | i18n }}{{detectionResultLabel}}
        </p>
        <p class="aui-text-help-sm aui-gutter-column-lg" *ngIf="isEn">
            {{copyDataLabel}} {{'common_copy_data_label' | i18n }} {{detectionResultLabel}}
        </p>
    </div>
</div>
<div class="report-title" *ngIf="!entity">
    <div class="title-block">
        <ng-container *ngIf="isCyberEngine; else elseTemplate">
            <h2 class="aui-gutter-column-md">{{ filesystemName }}</h2>
            <lv-form class="aui-text-help-sm aui-gutter-column-lg">
                <lv-form-column *ngFor='let column of columnItems' lvWidth="50%">
                    <lv-form-item *ngFor='let item of column'>
                        <lv-form-label>
                            <span lv-overflow class="key-warp">{{item.key}}</span>
                        </lv-form-label>
                        <lv-form-control>
                            <span lv-overflow class="value-warp">{{item.value | nil}}</span>
                        </lv-form-control>
                    </lv-form-item>
                </lv-form-column>
            </lv-form>
        </ng-container>
        <ng-template #elseTemplate>
            <h2 class="aui-gutter-column-md">{{ 'common_detail_label' | i18n }}</h2>
            <p class="aui-text-help-sm aui-gutter-column-lg" *ngIf="!isEn">
                {{lastTestLabel}}
                <br>
                {{DurationLabel}}{{timeUnitLabel}}
                <br>
                <span *ngIf="isInfected && !ishiddenDeploy">{{fileDurationLabel}}{{fileTimeUnitLabel}}</span>
            </p>
            <p class="aui-text-help-sm aui-gutter-column-lg" *ngIf="isEn">
                {{lastTestLabel}}
                <br>
                {{DurationLabel}}{{timeUnitLabel}}
                <br>
                <span *ngIf="isInfected && !ishiddenDeploy">{{fileDurationLabel}}{{fileTimeUnitLabel}}</span>
            </p>
        </ng-template>
        <div class="dashed-line setting-dashed-line"></div>
    </div>
</div>
<div class="report-container">
    <ng-container *ngIf="!_isEmpty(reportLabel)">
        <span [innerHTML]="reportLabel"></span>
    </ng-container>
    <ng-container *ngIf="_isEmpty(reportLabel)">
        <div class="report-no-data aui-block">
            <lv-empty></lv-empty>
        </div>
    </ng-container>
</div>
<!-- 可疑文件列表 -->
<div class="file-list restore-lv-paginator-simple" *ngIf="!hideAbnormalFile">
    <div class="aui-operation">
        <h3>
            {{'explore_suspicious_file_list_label' | i18n}}
            <i lv-icon="aui-icon-help" lv-tooltip="{{'explore_max_infected_file_label' | i18n:[10000]}}"
                lvTooltipPosition="rightTop" lvTooltipTheme="light" lvColorState='true'></i>
        </h3>
        <ng-container *ngIf="!!tableData?.total">
            <i lv-icon="lv-icon-download" [lvColorState]="true" (click)="exportResult()"
                lv-tooltip="{{'common_download_label' | i18n}}" pmpermission pmOperation='RestoreCopy'></i>
        </ng-container>
    </div>
    <lv-pro-table #dataTable [config]="tableConfig" [data]="tableData"></lv-pro-table>
</div>